package at.fhj.pse.domain.test;

import java.util.Date;
import java.util.List;

import javax.ejb.EJB;
import javax.ejb.Remote;
import javax.ejb.Stateless;

import at.fhj.pse.datasource.model.Activity;
import at.fhj.pse.datasource.model.Employee;
import at.fhj.pse.datasource.model.TimeInterval;
import at.fhj.pse.domain.TimeIntervalBean;
import at.fhj.pse.domain.service.IntervalService;

@Stateless
@Remote(TimeIntervalBean.class)
public class TimeIntervalBeanTestFacade implements TimeIntervalBean {

	@EJB(beanName = "TimeIntervalBeanImpl")
	private TimeIntervalBean bean;

	@Override
	public List<String> getActivityNames() {
		return bean.getActivityNames();
	}

	@Override
	public boolean validateToGreaterThanFrom(Date toDate, Date fromDate) {
		return bean.validateToGreaterThanFrom(toDate, fromDate);
	}

	@Override
	public boolean validateSameDay(Date toDate, Date fromDate) {
		return bean.validateSameDay(toDate, fromDate);
	}

	@Override
	public boolean intervalOverlap(Employee employee, Date toDate, Date fromDate) {
		return bean.intervalOverlap(employee, toDate, fromDate);
	}

	@Override
	public void addTimeInterval(Employee employee, Date toDate, Date fromDate,
			String comment, Activity activity) {
		bean.addTimeInterval(employee, toDate, fromDate, comment, activity);
	}

	@Override
	public List<TimeInterval> getAllEmployeeIntervals(long employeeId) {
		return bean.getAllEmployeeIntervals(employeeId);
	}

	@Override
	public List<TimeInterval> loadAllEmployeeIntervals(long employeeId) {
		return bean.loadAllEmployeeIntervals(employeeId);
	}

	@Override
	public IntervalService getIntervalServiceByDay(Date day, Employee employee) {
		return bean.getIntervalServiceByDay(day, employee);
	}

	@Override
	public IntervalService getIntervalServiceByMonthAndYear(Employee employee,
			String month, int year) {
		return bean.getIntervalServiceByMonthAndYear(employee, month, year);
	}

	@Override
	public IntervalService getIntervalServiceByActivity(Employee employee,
			Date toDate, Date fromDate, Activity activity) {
		return bean.getIntervalServiceByActivity(employee, toDate, fromDate,
				activity);
	}

	@Override
	public IntervalService getIntervalServiceByDates(Employee employee,
			Date toDate, Date fromDate) {
		return bean.getIntervalServiceByDates(employee, toDate, fromDate);
	}

	@Override
	public Activity getActivityByName(String activityName) {
		return bean.getActivityByName(activityName);
	}

	@Override
	public void deleteTimeIntervalById(long interval_id) {
		bean.deleteTimeIntervalById(interval_id);
	}

	@Override
	public List<TimeInterval> getIntervalsByDay(Date day, Employee employee) {
		return bean.getIntervalsByDay(day, employee);
	}

	@Override
	public List<TimeInterval> getIntervalsByActivity(Activity activity,	Date fromDate, Date toDate, Employee employee) {
		return bean.getIntervalsByActivity(activity, fromDate, toDate, employee);
	}

	@Override
	public List<TimeInterval> getIntervalsByDates(Date fromDate, Date toDate, Employee employee) {
		return bean.getIntervalsByDates(fromDate, toDate, employee);
	}

}
